#!/bin/bash

# postinst script for util-illumos
#
# see: dh_installdeb(1)

#set -e

# summary of how this script can be called:
#        * <postinst> \`configure' <most-recently-configured-version>
#        * <old-postinst> \`abort-upgrade' <new version>
#        * <conflictor's-postinst> \`abort-remove' \`in-favour' <package>
#          <new-version>
#        * <postinst> \`abort-remove'
#        * <deconfigured's-postinst> \`abort-deconfigure' \`in-favour'
#          <failed-install-package> <version> \`removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

PATH=/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

if [ "${BASEDIR:=/}" = "/" ]; then
    BASEDIR=""
else
    BASEDIR_OPT="-b $BASEDIR"
fi

case "$1" in
    configure)
        chown root:bin $BASEDIR/etc/dhcp
	chown root:bin $BASEDIR/lib/inet
	chown root:bin $BASEDIR/system
	chown root:bin $BASEDIR/system/bin
	chown root:bin $BASEDIR/system/lib
	chown root:bin $BASEDIR/system/lib/amd64
	chown root:bin $BASEDIR/usr/lib/audit
	chown root:bin $BASEDIR/usr/lib/inet
	chown root:bin $BASEDIR/usr/lib/inet/amd64
	chown root:bin $BASEDIR/usr/lib/locale
	chown root:bin $BASEDIR/usr/lib/pci
	chown root:bin $BASEDIR/usr/lib/rcm
	chown root:bin $BASEDIR/usr/lib/rcm/modules
	chown root:bin $BASEDIR/usr/lib/rcm/scripts
	chown root:bin $BASEDIR/usr/lib/reparse
	chown root:bin $BASEDIR/usr/lib/saf
	chown root:bin $BASEDIR/usr/lib/security
	chown root:bin $BASEDIR/usr/lib/security/amd64
	chown root:bin $BASEDIR/usr/lib/sysevent
	chown root:bin $BASEDIR/usr/lib/sysevent/modules
	chown root:bin $BASEDIR/usr/sadm
	chown root:bin $BASEDIR/usr/sadm/bin
	chown root:bin $BASEDIR/usr/sadm/install
	chown root:bin $BASEDIR/usr/sadm/install/scripts
	chown root:bin $BASEDIR/usr/share/lib/pub
	chown root:bin $BASEDIR/var/logadm
	chown root:bin $BASEDIR/var/news
	chown root:bin $BASEDIR/var/saf
	chown root:bin $BASEDIR/var/preserve
	chown daemon:daemon $BASEDIR/var/idmap
	chown root:root $BASEDIR/system/boot
	chown root:root $BASEDIR/system/contract
	chown root:root $BASEDIR/system/object
	chown root:sys $BASEDIR/etc/flash/postcreation
	chown root:sys $BASEDIR/etc/flash/precreation
	chown root:sys $BASEDIR/etc/flash/preexit
	chown root:sys $BASEDIR/etc/crypto
	chown root:sys $BASEDIR/etc/crypto/crls
	chown root:sys $BASEDIR/etc/dev
	chown root:sys $BASEDIR/etc/devices
	chown root:sys $BASEDIR/etc/dfs
	chown root:sys $BASEDIR/etc/flash
	chown root:sys $BASEDIR/etc/fs
	chown root:sys $BASEDIR/etc/fs/dev
	chown root:sys $BASEDIR/etc/fs/hsfs
	chown root:sys $BASEDIR/etc/fs/ufs
	chown root:sys $BASEDIR/etc/inet
	chown root:sys $BASEDIR/etc/logadm.d
	chown root:sys $BASEDIR/etc/net
	chown root:sys $BASEDIR/etc/net/ticlts
	chown root:sys $BASEDIR/etc/net/ticots
	chown root:sys $BASEDIR/etc/net/ticotsord
	chown root:sys $BASEDIR/etc/rpcsec
	chown root:sys $BASEDIR/etc/saf
	chown root:sys $BASEDIR/etc/saf/zsmon
	chown root:sys $BASEDIR/etc/security
	chown root:sys $BASEDIR/etc/security/audit
	chown root:sys $BASEDIR/etc/security/audit/localhost
	chown root:sys $BASEDIR/etc/security/auth_attr.d
	chown root:sys $BASEDIR/etc/security/dev
	chown root:sys $BASEDIR/etc/security/exec_attr.d
	chown root:sys $BASEDIR/etc/security/lib
	chown root:sys $BASEDIR/etc/security/prof_attr.d
	chown root:sys $BASEDIR/etc/sysevent
	chown root:sys $BASEDIR/etc/sysevent/config
	chown root:sys $BASEDIR/etc/tm
	chown root:sys $BASEDIR/etc/user_attr.d
	chown root:sys $BASEDIR/usr/lib/adb
	chown root:sys $BASEDIR/usr/lib/adb/amd64
	chown root:sys $BASEDIR/usr/lib/crypto
	chown root:sys $BASEDIR/usr/lib/fs
	chown root:sys $BASEDIR/usr/lib/fs/autofs
	chown root:sys $BASEDIR/usr/lib/fs/autofs/amd64
	chown root:sys $BASEDIR/usr/lib/fs/ctfs
	chown root:sys $BASEDIR/usr/lib/fs/dev
	chown root:sys $BASEDIR/usr/lib/fs/fd
	chown root:sys $BASEDIR/usr/lib/fs/hsfs
	chown root:sys $BASEDIR/usr/lib/fs/hyprlofs
	chown root:sys $BASEDIR/usr/lib/fs/lofs
	chown root:sys $BASEDIR/usr/lib/fs/lxproc
	chown root:sys $BASEDIR/usr/lib/fs/mntfs
	chown root:sys $BASEDIR/usr/lib/fs/nfs
	chown root:sys $BASEDIR/usr/lib/fs/objfs
	chown root:sys $BASEDIR/usr/lib/fs/pcfs
	chown root:sys $BASEDIR/usr/lib/fs/proc
	chown root:sys $BASEDIR/usr/lib/fs/sharefs
	chown root:sys $BASEDIR/usr/lib/fs/tmpfs
	chown root:sys $BASEDIR/usr/lib/fs/ufs
	chown root:sys $BASEDIR/usr/lib/netsvc
	chown root:sys $BASEDIR/usr/net
	chown root:sys $BASEDIR/usr/net/nls
	chown root:sys $BASEDIR/usr/net/servers
	chown root:sys $BASEDIR/usr/share/lib
	chown root:sys $BASEDIR/usr/share/lib/xml
	chown root:sys $BASEDIR/usr/share/lib/xml/dtd
	chown root:sys $BASEDIR/usr/share/lib/xml/style
	chown root:sys $BASEDIR/var/audit
	chown root:sys $BASEDIR/var/inet
	chown root:sys $BASEDIR/var/saf/zsmon
	if [ "$ZONEINST" = "1" ]; then
	    [ -f $BASEDIR/usr/share/man/man8/rdmsr.8 ] && rm -f $BASEDIR/usr/share/man/man8/rdmsr.8
	fi
	chmod 0755 "$BASEDIR/usr/sbin/nlsadmin"
	chown root:adm "$BASEDIR/usr/sbin/nlsadmin"
	chmod 0400 "$BASEDIR/etc/security/dev/audio"
	chown root:bin "$BASEDIR/etc/security/dev/audio"
	chmod 0400 "$BASEDIR/etc/security/dev/fd0"
	chown root:bin "$BASEDIR/etc/security/dev/fd0"
	chmod 0400 "$BASEDIR/etc/security/dev/sr0"
	chown root:bin "$BASEDIR/etc/security/dev/sr0"
	chmod 0400 "$BASEDIR/etc/security/dev/st0"
	chown root:bin "$BASEDIR/etc/security/dev/st0"
	chmod 0400 "$BASEDIR/etc/security/dev/st1"
	chown root:bin "$BASEDIR/etc/security/dev/st1"
	chmod 0444 "$BASEDIR/usr/lib/audit/audit_record_attr"
	chown root:bin "$BASEDIR/usr/lib/audit/audit_record_attr"
	chmod 0444 "$BASEDIR/usr/sadm/ugdates"
	chown root:bin "$BASEDIR/usr/sadm/ugdates"
	chmod 0444 "$BASEDIR/usr/share/lib/xml/dtd/adt_record.dtd.1"
	chown root:bin "$BASEDIR/usr/share/lib/xml/dtd/adt_record.dtd.1"
	chmod 0444 "$BASEDIR/usr/share/lib/xml/dtd/kmfpolicy.dtd"
	chown root:bin "$BASEDIR/usr/share/lib/xml/dtd/kmfpolicy.dtd"
	chmod 0444 "$BASEDIR/usr/share/lib/xml/style/adt_record.xsl.1"
	chown root:bin "$BASEDIR/usr/share/lib/xml/style/adt_record.xsl.1"
	chmod 0555 "$BASEDIR/etc/fs/dev/mount"
	chown root:bin "$BASEDIR/etc/fs/dev/mount"
	chmod 0555 "$BASEDIR/etc/fs/hsfs/mount"
	chown root:bin "$BASEDIR/etc/fs/hsfs/mount"
	chmod 0555 "$BASEDIR/etc/fs/ufs/mount"
	chown root:bin "$BASEDIR/etc/fs/ufs/mount"
	chmod 0555 "$BASEDIR/lib/svc/method/boot-archive"
	chown root:bin "$BASEDIR/lib/svc/method/boot-archive"
	chmod 0555 "$BASEDIR/lib/svc/method/boot-archive-update"
	chown root:bin "$BASEDIR/lib/svc/method/boot-archive-update"
	chmod 0555 "$BASEDIR/lib/svc/method/svc-hostid"
	chown root:bin "$BASEDIR/lib/svc/method/svc-hostid"
	chmod 0555 "$BASEDIR/lib/svc/method/svc-utmpd"
	chown root:bin "$BASEDIR/lib/svc/method/svc-utmpd"
	chmod 0555 "$BASEDIR/sbin/autopush"
	chown root:bin "$BASEDIR/sbin/autopush"
	chmod 0555 "$BASEDIR/sbin/biosdev"
	chown root:bin "$BASEDIR/sbin/biosdev"
	chmod 0555 "$BASEDIR/sbin/bootparams"
	chown root:bin "$BASEDIR/sbin/bootparams"
	chmod 0555 "$BASEDIR/sbin/cryptoadm"
	chown root:bin "$BASEDIR/sbin/cryptoadm"
	chmod 0555 "$BASEDIR/sbin/devprop"
	chown root:bin "$BASEDIR/sbin/devprop"
	chmod 0555 "$BASEDIR/sbin/dhcpagent"
	chown root:bin "$BASEDIR/sbin/dhcpagent"
	chmod 0555 "$BASEDIR/sbin/dhcpinfo"
	chown root:bin "$BASEDIR/sbin/dhcpinfo"
	chmod 0555 "$BASEDIR/sbin/fdisk"
	chown root:bin "$BASEDIR/sbin/fdisk"
	chmod 0555 "$BASEDIR/sbin/fiocompress"
	chown root:bin "$BASEDIR/sbin/fiocompress"
	chmod 0555 "$BASEDIR/sbin/hostconfig"
	chown root:bin "$BASEDIR/sbin/hostconfig"
	chmod 0555 "$BASEDIR/sbin/ipmpstat"
	chown root:bin "$BASEDIR/sbin/ipmpstat"
	chmod 0555 "$BASEDIR/sbin/mount"
	chown root:bin "$BASEDIR/sbin/mount"
	chmod 0555 "$BASEDIR/sbin/netstrategy"
	chown root:bin "$BASEDIR/sbin/netstrategy"
	chmod 0555 "$BASEDIR/sbin/soconfig"
	chown root:bin "$BASEDIR/sbin/soconfig"
	chmod 0555 "$BASEDIR/sbin/tzreload"
	chown root:bin "$BASEDIR/sbin/tzreload"
	chmod 0555 "$BASEDIR/sbin/umount"
	chown root:bin "$BASEDIR/sbin/umount"
	chmod 0555 "$BASEDIR/sbin/uname"
	chown root:bin "$BASEDIR/sbin/uname"
	chmod 0555 "$BASEDIR/system/bin/cat"
	chown root:bin "$BASEDIR/system/bin/cat"
	chmod 0555 "$BASEDIR/system/bin/chgrp"
	chown root:bin "$BASEDIR/system/bin/chgrp"
	chmod 0555 "$BASEDIR/system/bin/chmod"
	chown root:bin "$BASEDIR/system/bin/chmod"
	chmod 0555 "$BASEDIR/system/bin/chown"
	chown root:bin "$BASEDIR/system/bin/chown"
	chmod 0555 "$BASEDIR/system/bin/chroot"
	chown root:bin "$BASEDIR/system/bin/chroot"
	chmod 0555 "$BASEDIR/system/bin/clear"
	chown root:bin "$BASEDIR/system/bin/clear"
	chmod 0555 "$BASEDIR/system/bin/compress"
	chown root:bin "$BASEDIR/system/bin/compress"
	chmod 0555 "$BASEDIR/system/bin/cp"
	chown root:bin "$BASEDIR/system/bin/cp"
	chmod 0555 "$BASEDIR/system/bin/cpio"
	chown root:bin "$BASEDIR/system/bin/cpio"
	chmod 0555 "$BASEDIR/system/bin/date"
	chown root:bin "$BASEDIR/system/bin/date"
	chmod 0555 "$BASEDIR/system/bin/dd"
	chown root:bin "$BASEDIR/system/bin/dd"
	chmod 0555 "$BASEDIR/system/bin/df"
	chown root:bin "$BASEDIR/system/bin/df"
	chmod 0555 "$BASEDIR/system/bin/file"
	chown root:bin "$BASEDIR/system/bin/file"
	chmod 0555 "$BASEDIR/system/bin/find"
	chown root:bin "$BASEDIR/system/bin/find"
	chmod 0555 "$BASEDIR/system/bin/getopt"
	chown root:bin "$BASEDIR/system/bin/getopt"
	chmod 0555 "$BASEDIR/system/bin/grep"
	chown root:bin "$BASEDIR/system/bin/grep"
	chmod 0555 "$BASEDIR/system/bin/groupadd"
	chown root:bin "$BASEDIR/system/bin/groupadd"
	chmod 0555 "$BASEDIR/system/bin/groupdel"
	chown root:bin "$BASEDIR/system/bin/groupdel"
	chmod 0555 "$BASEDIR/system/bin/groupmod"
	chown root:bin "$BASEDIR/system/bin/groupmod"
	chmod 0555 "$BASEDIR/system/bin/groups"
	chown root:bin "$BASEDIR/system/bin/groups"
	chmod 0555 "$BASEDIR/system/bin/head"
	chown root:bin "$BASEDIR/system/bin/head"
	chmod 0555 "$BASEDIR/system/bin/id"
	chown root:bin "$BASEDIR/system/bin/id"
	chmod 0555 "$BASEDIR/system/bin/install"
	chown root:bin "$BASEDIR/system/bin/install"
	chmod 0555 "$BASEDIR/system/bin/logger"
	chown root:bin "$BASEDIR/system/bin/logger"
	chmod 0555 "$BASEDIR/system/bin/ls"
	chown root:bin "$BASEDIR/system/bin/ls"
	chmod 0555 "$BASEDIR/system/bin/mkdir"
	chown root:bin "$BASEDIR/system/bin/mkdir"
	chmod 0555 "$BASEDIR/system/bin/mktemp"
	chown root:bin "$BASEDIR/system/bin/mktemp"
	chmod 0555 "$BASEDIR/system/bin/more"
	chown root:bin "$BASEDIR/system/bin/more"
	chmod 0555 "$BASEDIR/system/bin/pg"
	chown root:bin "$BASEDIR/system/bin/pg"
	chmod 0555 "$BASEDIR/system/bin/profiles"
	chown root:bin "$BASEDIR/system/bin/profiles"
	chmod 0555 "$BASEDIR/system/bin/renice"
	chown root:bin "$BASEDIR/system/bin/renice"
	chmod 0555 "$BASEDIR/system/bin/tabs"
	chown root:bin "$BASEDIR/system/bin/tabs"
	chmod 0555 "$BASEDIR/system/bin/tar"
	chown root:bin "$BASEDIR/system/bin/tar"
	chmod 0555 "$BASEDIR/system/bin/useradd"
	chown root:bin "$BASEDIR/system/bin/useradd"
	chmod 0555 "$BASEDIR/system/bin/userdel"
	chown root:bin "$BASEDIR/system/bin/userdel"
	chmod 0555 "$BASEDIR/system/bin/usermod"
	chown root:bin "$BASEDIR/system/bin/usermod"
	chmod 0555 "$BASEDIR/usr/bin/addbadsec"
	chown root:bin "$BASEDIR/usr/bin/addbadsec"
	chmod 0555 "$BASEDIR/usr/bin/amt"
	chown root:bin "$BASEDIR/usr/bin/amt"
	chmod 0555 "$BASEDIR/usr/bin/asa"
	chown root:bin "$BASEDIR/usr/bin/asa"
	chmod 0555 "$BASEDIR/usr/bin/attr"
	chown root:bin "$BASEDIR/usr/bin/attr"
	chmod 0555 "$BASEDIR/usr/bin/auths"
	chown root:bin "$BASEDIR/usr/bin/auths"
	chmod 0555 "$BASEDIR/usr/bin/banner"
	chown root:bin "$BASEDIR/usr/bin/banner"
	chmod 0555 "$BASEDIR/usr/bin/busstat"
	chown root:bin "$BASEDIR/usr/bin/busstat"
	chmod 0555 "$BASEDIR/usr/bin/ckdate"
	chown root:bin "$BASEDIR/usr/bin/ckdate"
	chmod 0555 "$BASEDIR/usr/bin/ckgid"
	chown root:bin "$BASEDIR/usr/bin/ckgid"
	chmod 0555 "$BASEDIR/usr/bin/ckint"
	chown root:bin "$BASEDIR/usr/bin/ckint"
	chmod 0555 "$BASEDIR/usr/bin/ckitem"
	chown root:bin "$BASEDIR/usr/bin/ckitem"
	chmod 0555 "$BASEDIR/usr/bin/ckkeywd"
	chown root:bin "$BASEDIR/usr/bin/ckkeywd"
	chmod 0555 "$BASEDIR/usr/bin/ckpath"
	chown root:bin "$BASEDIR/usr/bin/ckpath"
	chmod 0555 "$BASEDIR/usr/bin/ckrange"
	chown root:bin "$BASEDIR/usr/bin/ckrange"
	chmod 0555 "$BASEDIR/usr/bin/ckstr"
	chown root:bin "$BASEDIR/usr/bin/ckstr"
	chmod 0555 "$BASEDIR/usr/bin/cktime"
	chown root:bin "$BASEDIR/usr/bin/cktime"
	chmod 0555 "$BASEDIR/usr/bin/ckuid"
	chown root:bin "$BASEDIR/usr/bin/ckuid"
	chmod 0555 "$BASEDIR/usr/bin/ckyorn"
	chown root:bin "$BASEDIR/usr/bin/ckyorn"
	chmod 0555 "$BASEDIR/usr/bin/crypt"
	chown root:bin "$BASEDIR/usr/bin/crypt"
	chmod 0555 "$BASEDIR/usr/bin/ctrun"
	chown root:bin "$BASEDIR/usr/bin/ctrun"
	chmod 0555 "$BASEDIR/usr/bin/ctstat"
	chown root:bin "$BASEDIR/usr/bin/ctstat"
	chmod 0555 "$BASEDIR/usr/bin/ctwatch"
	chown root:bin "$BASEDIR/usr/bin/ctwatch"
	chmod 0555 "$BASEDIR/usr/bin/decrypt"
	chown root:bin "$BASEDIR/usr/bin/decrypt"
	chmod 0555 "$BASEDIR/usr/bin/decrypt"
	chown root:bin "$BASEDIR/usr/bin/decrypt"
	chmod 0555 "$BASEDIR/usr/bin/devattr"
	chown root:bin "$BASEDIR/usr/bin/devattr"
	chmod 0555 "$BASEDIR/usr/bin/devfree"
	chown root:bin "$BASEDIR/usr/bin/devfree"
	chmod 0555 "$BASEDIR/usr/bin/devreserv"
	chown root:bin "$BASEDIR/usr/bin/devreserv"
	chmod 0555 "$BASEDIR/usr/bin/digest"
	chown root:bin "$BASEDIR/usr/bin/digest"
	chmod 0555 "$BASEDIR/usr/bin/dircmp"
	chown root:bin "$BASEDIR/usr/bin/dircmp"
	chmod 0555 "$BASEDIR/usr/bin/diskscan"
	chown root:bin "$BASEDIR/usr/bin/diskscan"
	chmod 0555 "$BASEDIR/usr/bin/dumpcs"
	chown root:bin "$BASEDIR/usr/bin/dumpcs"
	chmod 0555 "$BASEDIR/usr/bin/eject"
	chown root:bin "$BASEDIR/usr/bin/eject"
	chmod 0555 "$BASEDIR/usr/bin/fdetach"
	chown root:bin "$BASEDIR/usr/bin/fdetach"
	chmod 0555 "$BASEDIR/usr/bin/fmtmsg"
	chown root:bin "$BASEDIR/usr/bin/fmtmsg"
	chmod 0555 "$BASEDIR/usr/bin/fsstat"
	chown root:bin "$BASEDIR/usr/bin/fsstat"
	chmod 0555 "$BASEDIR/usr/bin/getdev"
	chown root:bin "$BASEDIR/usr/bin/getdev"
	chmod 0555 "$BASEDIR/usr/bin/getdgrp"
	chown root:bin "$BASEDIR/usr/bin/getdgrp"
	chmod 0555 "$BASEDIR/usr/bin/getvol"
	chown root:bin "$BASEDIR/usr/bin/getvol"
	chmod 0555 "$BASEDIR/usr/bin/iostat"
	chown root:bin "$BASEDIR/usr/bin/iostat"
	chmod 0555 "$BASEDIR/usr/bin/kbd"
	chown root:bin "$BASEDIR/usr/bin/kbd"
	chmod 0555 "$BASEDIR/usr/bin/kmfcfg"
	chown root:bin "$BASEDIR/usr/bin/kmfcfg"
	chmod 0555 "$BASEDIR/usr/bin/kstat"
	chown root:bin "$BASEDIR/usr/bin/kstat"
	chmod 0555 "$BASEDIR/usr/bin/kvmstat"
	chown root:bin "$BASEDIR/usr/bin/kvmstat"
	chmod 0555 "$BASEDIR/usr/bin/last"
	chown root:bin "$BASEDIR/usr/bin/last"
	chmod 0555 "$BASEDIR/usr/bin/lgrpinfo"
	chown root:bin "$BASEDIR/usr/bin/lgrpinfo"
	chmod 0555 "$BASEDIR/usr/bin/line"
	chown root:bin "$BASEDIR/usr/bin/line"
	chmod 0555 "$BASEDIR/usr/bin/listdgrp"
	chown root:bin "$BASEDIR/usr/bin/listdgrp"
	chmod 0555 "$BASEDIR/usr/bin/listusers"
	chown root:bin "$BASEDIR/usr/bin/listusers"
	chmod 0555 "$BASEDIR/usr/bin/mach"
	chown root:bin "$BASEDIR/usr/bin/mach"
	chmod 0555 "$BASEDIR/usr/bin/makedev"
	chown root:bin "$BASEDIR/usr/bin/makedev"
	chmod 0555 "$BASEDIR/usr/bin/mesg"
	chown root:bin "$BASEDIR/usr/bin/mesg"
	chmod 0555 "$BASEDIR/usr/bin/mpstat"
	chown root:bin "$BASEDIR/usr/bin/mpstat"
	chmod 0555 "$BASEDIR/usr/bin/newform"
	chown root:bin "$BASEDIR/usr/bin/newform"
	chmod 0555 "$BASEDIR/usr/bin/news"
	chown root:bin "$BASEDIR/usr/bin/news"
	chmod 0555 "$BASEDIR/usr/bin/optisa"
	chown root:bin "$BASEDIR/usr/bin/optisa"
	chmod 0555 "$BASEDIR/usr/bin/pack"
	chown root:bin "$BASEDIR/usr/bin/pack"
	chmod 0555 "$BASEDIR/usr/bin/pagesize"
	chown root:bin "$BASEDIR/usr/bin/pagesize"
	chmod 0555 "$BASEDIR/usr/bin/pargs"
	chown root:bin "$BASEDIR/usr/bin/pargs"
	chmod 0555 "$BASEDIR/usr/bin/pcred"
	chown root:bin "$BASEDIR/usr/bin/pcred"
	chmod 0555 "$BASEDIR/usr/bin/pfexec"
	chown root:bin "$BASEDIR/usr/bin/pfexec"
	chmod 0555 "$BASEDIR/usr/bin/pfiles"
	chown root:bin "$BASEDIR/usr/bin/pfiles"
	chmod 0555 "$BASEDIR/usr/bin/pflags"
	chown root:bin "$BASEDIR/usr/bin/pflags"
	chmod 0555 "$BASEDIR/usr/bin/pginfo"
	chown root:bin "$BASEDIR/usr/bin/pginfo"
	chmod 0555 "$BASEDIR/usr/bin/pgrep"
	chown root:bin "$BASEDIR/usr/bin/pgrep"
	chmod 0555 "$BASEDIR/usr/bin/pgstat"
	chown root:bin "$BASEDIR/usr/bin/pgstat"
	chmod 0555 "$BASEDIR/usr/bin/pktool"
	chown root:bin "$BASEDIR/usr/bin/pktool"
	chmod 0555 "$BASEDIR/usr/bin/plgrp"
	chown root:bin "$BASEDIR/usr/bin/plgrp"
	chmod 0555 "$BASEDIR/usr/bin/pmadvise"
	chown root:bin "$BASEDIR/usr/bin/pmadvise"
	chmod 0555 "$BASEDIR/usr/bin/pmap"
	chown root:bin "$BASEDIR/usr/bin/pmap"
	chmod 0555 "$BASEDIR/usr/bin/ppgsz"
	chown root:bin "$BASEDIR/usr/bin/ppgsz"
	chmod 0555 "$BASEDIR/usr/bin/ppriv"
	chown root:bin "$BASEDIR/usr/bin/ppriv"
	chmod 0555 "$BASEDIR/usr/bin/preap"
	chown root:bin "$BASEDIR/usr/bin/preap"
	chmod 0555 "$BASEDIR/usr/bin/projects"
	chown root:bin "$BASEDIR/usr/bin/projects"
	chmod 0555 "$BASEDIR/usr/bin/prstat"
	chown root:bin "$BASEDIR/usr/bin/prstat"
	chmod 0555 "$BASEDIR/usr/bin/prun"
	chown root:bin "$BASEDIR/usr/bin/prun"
	chmod 0555 "$BASEDIR/usr/bin/ps"
	chown root:bin "$BASEDIR/usr/bin/ps"
	chmod 0555 "$BASEDIR/usr/bin/psecflags"
	chown root:bin "$BASEDIR/usr/bin/psecflags"
	chmod 0555 "$BASEDIR/usr/bin/psig"
	chown root:bin "$BASEDIR/usr/bin/psig"
	chmod 0555 "$BASEDIR/usr/bin/pstack"
	chown root:bin "$BASEDIR/usr/bin/pstack"
	chmod 0555 "$BASEDIR/usr/bin/pstop"
	chown root:bin "$BASEDIR/usr/bin/pstop"
	chmod 0555 "$BASEDIR/usr/bin/ptime"
	chown root:bin "$BASEDIR/usr/bin/ptime"
	chmod 0555 "$BASEDIR/usr/bin/ptree"
	chown root:bin "$BASEDIR/usr/bin/ptree"
	chmod 0555 "$BASEDIR/usr/bin/putdev"
	chown root:bin "$BASEDIR/usr/bin/putdev"
	chmod 0555 "$BASEDIR/usr/bin/putdgrp"
	chown root:bin "$BASEDIR/usr/bin/putdgrp"
	chmod 0555 "$BASEDIR/usr/bin/pwait"
	chown root:bin "$BASEDIR/usr/bin/pwait"
	chmod 0555 "$BASEDIR/usr/bin/pwdx"
	chown root:bin "$BASEDIR/usr/bin/pwdx"
	chmod 0555 "$BASEDIR/usr/bin/roles"
	chown root:bin "$BASEDIR/usr/bin/roles"
	chmod 0555 "$BASEDIR/usr/bin/rpcinfo"
	chown root:bin "$BASEDIR/usr/bin/rpcinfo"
	chmod 0555 "$BASEDIR/usr/bin/runat"
	chown root:bin "$BASEDIR/usr/bin/runat"
	chmod 0555 "$BASEDIR/usr/bin/script"
	chown root:bin "$BASEDIR/usr/bin/script"
	chmod 0555 "$BASEDIR/usr/bin/tcopy"
	chown root:bin "$BASEDIR/usr/bin/tcopy"
	chmod 0555 "$BASEDIR/usr/bin/unpack"
	chown root:bin "$BASEDIR/usr/bin/unpack"
	chmod 0555 "$BASEDIR/usr/bin/userattr"
	chown root:bin "$BASEDIR/usr/bin/userattr"
	chmod 0555 "$BASEDIR/usr/bin/vmstat"
	chown root:bin "$BASEDIR/usr/bin/vmstat"
	chmod 0555 "$BASEDIR/usr/bin/vtfontcvt"
	chown root:bin "$BASEDIR/usr/bin/vtfontcvt"
	chmod 0555 "$BASEDIR/usr/bin/xstr"
	chown root:bin "$BASEDIR/usr/bin/xstr"
	chmod 0555 "$BASEDIR/usr/lib/fs/ctfs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/ctfs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/fd/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/fd/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/hsfs/fstyp.so.1"
	chown root:bin "$BASEDIR/usr/lib/fs/hsfs/fstyp.so.1"
	chmod 0555 "$BASEDIR/usr/lib/fs/hsfs/labelit"
	chown root:bin "$BASEDIR/usr/lib/fs/hsfs/labelit"
	chmod 0555 "$BASEDIR/usr/lib/fs/hyprlofs/hlcfg"
	chown root:bin "$BASEDIR/usr/lib/fs/hyprlofs/hlcfg"
	chmod 0555 "$BASEDIR/usr/lib/fs/hyprlofs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/hyprlofs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/lofs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/lofs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/lxproc/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/lxproc/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/mntfs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/mntfs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/objfs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/objfs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/pcfs/fsck"
	chown root:bin "$BASEDIR/usr/lib/fs/pcfs/fsck"
	chmod 0555 "$BASEDIR/usr/lib/fs/pcfs/fstyp.so.1"
	chown root:bin "$BASEDIR/usr/lib/fs/pcfs/fstyp.so.1"
	chmod 0555 "$BASEDIR/usr/lib/fs/pcfs/mkfs"
	chown root:bin "$BASEDIR/usr/lib/fs/pcfs/mkfs"
	chmod 0555 "$BASEDIR/usr/lib/fs/pcfs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/pcfs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/proc/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/proc/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/sharefs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/sharefs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/tmpfs/mount"
	chown root:bin "$BASEDIR/usr/lib/fs/tmpfs/mount"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/clri"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/clri"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/df"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/df"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/edquota"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/edquota"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/ff"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/ff"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fsck"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fsck"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fsckall"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fsckall"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fsdb"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fsdb"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fsirand"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fsirand"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fssnap"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fssnap"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/fstyp.so.1"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/fstyp.so.1"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/labelit"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/labelit"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/lockfs"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/lockfs"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/mkfs"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/mkfs"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/ncheck"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/ncheck"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/newfs"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/newfs"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/quot"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/quot"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/quotacheck"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/quotacheck"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/quotaon"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/quotaon"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/repquota"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/repquota"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/tunefs"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/tunefs"
	chmod 0555 "$BASEDIR/usr/lib/fs/ufs/volcopy"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/volcopy"
	chmod 0555 "$BASEDIR/usr/lib/getoptcvt"
	chown root:bin "$BASEDIR/usr/lib/getoptcvt"
	chmod 0555 "$BASEDIR/usr/lib/hotplugd"
	chown root:bin "$BASEDIR/usr/lib/hotplugd"
	chmod 0555 "$BASEDIR/usr/lib/idmapd"
	chown root:bin "$BASEDIR/usr/lib/idmapd"
	chmod 0555 "$BASEDIR/usr/lib/inet/inetd"
	chown root:bin "$BASEDIR/usr/lib/inet/inetd"
	chmod 0555 "$BASEDIR/usr/lib/makekey"
	chown root:bin "$BASEDIR/usr/lib/makekey"
	chmod 0555 "$BASEDIR/usr/lib/pci/pcidr"
	chown root:bin "$BASEDIR/usr/lib/pci/pcidr"
	chmod 0555 "$BASEDIR/usr/lib/pfexecd"
	chown root:bin "$BASEDIR/usr/lib/pfexecd"
	chmod 0555 "$BASEDIR/usr/lib/platexec"
	chown root:bin "$BASEDIR/usr/lib/platexec"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_aggr_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_aggr_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_cluster_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_cluster_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_dump_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_dump_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_filesys_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_filesys_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_ibpart_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_ibpart_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_ip_anon_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_ip_anon_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_ip_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_ip_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_mpxio_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_mpxio_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_network_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_network_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_swap_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_swap_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_vlan_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_vlan_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/modules/SUNW_vnic_rcm.so"
	chown root:bin "$BASEDIR/usr/lib/rcm/modules/SUNW_vnic_rcm.so"
	chmod 0555 "$BASEDIR/usr/lib/rcm/rcm_daemon"
	chown root:bin "$BASEDIR/usr/lib/rcm/rcm_daemon"
	chmod 0555 "$BASEDIR/usr/lib/sysevent/syseventconfd"
	chown root:bin "$BASEDIR/usr/lib/sysevent/syseventconfd"
	chmod 0555 "$BASEDIR/usr/lib/sysevent/syseventd"
	chown root:bin "$BASEDIR/usr/lib/sysevent/syseventd"
	chmod 0555 "$BASEDIR/usr/lib/vtdaemon"
	chown root:bin "$BASEDIR/usr/lib/vtdaemon"
	chmod 0555 "$BASEDIR/usr/lib/vtinfo"
	chown root:bin "$BASEDIR/usr/lib/vtinfo"
	chmod 0555 "$BASEDIR/usr/lib/vtxlock"
	chown root:bin "$BASEDIR/usr/lib/vtxlock"
	chmod 0555 "$BASEDIR/usr/sadm/bin/puttext"
	chown root:bin "$BASEDIR/usr/sadm/bin/puttext"
	chmod 0555 "$BASEDIR/usr/sbin/audit"
	chown root:bin "$BASEDIR/usr/sbin/audit"
	chmod 0555 "$BASEDIR/usr/sbin/auditconfig"
	chown root:bin "$BASEDIR/usr/sbin/auditconfig"
	chmod 0555 "$BASEDIR/usr/sbin/auditd"
	chown root:bin "$BASEDIR/usr/sbin/auditd"
	chmod 0555 "$BASEDIR/usr/sbin/auditrecord"
	chown root:bin "$BASEDIR/usr/sbin/auditrecord"
	chmod 0555 "$BASEDIR/usr/sbin/auditreduce"
	chown root:bin "$BASEDIR/usr/sbin/auditreduce"
	chmod 0555 "$BASEDIR/usr/sbin/auditstat"
	chown root:bin "$BASEDIR/usr/sbin/auditstat"
	chmod 0555 "$BASEDIR/usr/sbin/cfgadm"
	chown root:bin "$BASEDIR/usr/sbin/cfgadm"
	chmod 0555 "$BASEDIR/usr/sbin/clear_locks"
	chown root:bin "$BASEDIR/usr/sbin/clear_locks"
	chmod 0555 "$BASEDIR/usr/sbin/clinfo"
	chown root:bin "$BASEDIR/usr/sbin/clinfo"
	chmod 0555 "$BASEDIR/usr/sbin/clri"
	chown root:bin "$BASEDIR/usr/sbin/clri"
	chmod 0555 "$BASEDIR/usr/sbin/dfshares"
	chown root:bin "$BASEDIR/usr/sbin/dfshares"
	chmod 0555 "$BASEDIR/usr/sbin/dmesg"
	chown root:bin "$BASEDIR/usr/sbin/dmesg"
	chmod 0555 "$BASEDIR/usr/sbin/dminfo"
	chown root:bin "$BASEDIR/usr/sbin/dminfo"
	chmod 0555 "$BASEDIR/usr/sbin/ff"
	chown root:bin "$BASEDIR/usr/sbin/ff"
	chmod 0555 "$BASEDIR/usr/sbin/format"
	chown root:bin "$BASEDIR/usr/sbin/format"
	chmod 0555 "$BASEDIR/usr/sbin/fsck"
	chown root:bin "$BASEDIR/usr/sbin/fsck"
	chmod 0555 "$BASEDIR/usr/sbin/fuser"
	chown root:bin "$BASEDIR/usr/sbin/fuser"
	chmod 0555 "$BASEDIR/usr/sbin/growfs"
	chown root:bin "$BASEDIR/usr/sbin/growfs"
	chmod 0555 "$BASEDIR/usr/sbin/hotplug"
	chown root:bin "$BASEDIR/usr/sbin/hotplug"
	chmod 0555 "$BASEDIR/usr/sbin/idmap"
	chown root:bin "$BASEDIR/usr/sbin/idmap"
	chmod 0555 "$BASEDIR/usr/sbin/if_mpadm"
	chown root:bin "$BASEDIR/usr/sbin/if_mpadm"
	chmod 0555 "$BASEDIR/usr/sbin/inetadm"
	chown root:bin "$BASEDIR/usr/sbin/inetadm"
	chmod 0555 "$BASEDIR/usr/sbin/inetconv"
	chown root:bin "$BASEDIR/usr/sbin/inetconv"
	chmod 0555 "$BASEDIR/usr/sbin/ipsecalgs"
	chown root:bin "$BASEDIR/usr/sbin/ipsecalgs"
	chmod 0555 "$BASEDIR/usr/sbin/killall"
	chown root:bin "$BASEDIR/usr/sbin/killall"
	chmod 0555 "$BASEDIR/usr/sbin/lofiadm"
	chown root:bin "$BASEDIR/usr/sbin/lofiadm"
	chmod 0555 "$BASEDIR/usr/sbin/logadm"
	chown root:bin "$BASEDIR/usr/sbin/logadm"
	chmod 0555 "$BASEDIR/usr/sbin/mkdevalloc"
	chown root:bin "$BASEDIR/usr/sbin/mkdevalloc"
	chmod 0555 "$BASEDIR/usr/sbin/mkfile"
	chown root:bin "$BASEDIR/usr/sbin/mkfile"
	chmod 0555 "$BASEDIR/usr/sbin/msgid"
	chown root:bin "$BASEDIR/usr/sbin/msgid"
	chmod 0555 "$BASEDIR/usr/sbin/mvdir"
	chown root:bin "$BASEDIR/usr/sbin/mvdir"
	chmod 0555 "$BASEDIR/usr/sbin/ndp"
	chown root:bin "$BASEDIR/usr/sbin/ndp"
	chmod 0555 "$BASEDIR/usr/sbin/nscd"
	chown root:bin "$BASEDIR/usr/sbin/nscd"
	chmod 0555 "$BASEDIR/usr/sbin/praudit"
	chown root:bin "$BASEDIR/usr/sbin/praudit"
	chmod 0555 "$BASEDIR/usr/sbin/raidctl"
	chown root:bin "$BASEDIR/usr/sbin/raidctl"
	chmod 0555 "$BASEDIR/usr/sbin/ramdiskadm"
	chown root:bin "$BASEDIR/usr/sbin/ramdiskadm"
	chmod 0555 "$BASEDIR/usr/sbin/rctladm"
	chown root:bin "$BASEDIR/usr/sbin/rctladm"
	chmod 0555 "$BASEDIR/usr/sbin/rpcbind"
	chown root:bin "$BASEDIR/usr/sbin/rpcbind"
	chmod 0555 "$BASEDIR/usr/sbin/rtc"
	chown root:bin "$BASEDIR/usr/sbin/rtc"
	chmod 0555 "$BASEDIR/usr/sbin/setmnt"
	chown root:bin "$BASEDIR/usr/sbin/setmnt"
	chmod 0555 "$BASEDIR/usr/sbin/shareall"
	chown root:bin "$BASEDIR/usr/sbin/shareall"
	chmod 0555 "$BASEDIR/usr/sbin/sharectl"
	chown root:bin "$BASEDIR/usr/sbin/sharectl"
	chmod 0555 "$BASEDIR/usr/sbin/sharemgr"
	chown root:bin "$BASEDIR/usr/sbin/sharemgr"
	chmod 0555 "$BASEDIR/usr/sbin/smbios"
	chown root:bin "$BASEDIR/usr/sbin/smbios"
	chmod 0555 "$BASEDIR/usr/sbin/stmsboot"
	chown root:bin "$BASEDIR/usr/sbin/stmsboot"
	chmod 0555 "$BASEDIR/usr/sbin/syncinit"
	chown root:bin "$BASEDIR/usr/sbin/syncinit"
	chmod 0555 "$BASEDIR/usr/sbin/syncloop"
	chown root:bin "$BASEDIR/usr/sbin/syncloop"
	chmod 0555 "$BASEDIR/usr/sbin/syncstat"
	chown root:bin "$BASEDIR/usr/sbin/syncstat"
	chmod 0555 "$BASEDIR/usr/sbin/ucodeadm"
	chown root:bin "$BASEDIR/usr/sbin/ucodeadm"
	chmod 0555 "$BASEDIR/usr/sbin/unshareall"
	chown root:bin "$BASEDIR/usr/sbin/unshareall"
	chmod 0555 "$BASEDIR/usr/sbin/utmpd"
	chown root:bin "$BASEDIR/usr/sbin/utmpd"
	chmod 0555 "$BASEDIR/usr/sbin/volcopy"
	chown root:bin "$BASEDIR/usr/sbin/volcopy"
	[ -f $BASEDIR/etc/remote ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/remote $BASEDIR/etc/remote
	chmod 0644 "$BASEDIR/etc/remote"
	chown root:bin "$BASEDIR/etc/remote"
	chmod 0644 "$BASEDIR/etc/security/kmfpolicy.xml"
	chown root:bin "$BASEDIR/etc/security/kmfpolicy.xml"
	chmod 0750 "$BASEDIR/usr/bin/logins"
	chown root:bin "$BASEDIR/usr/bin/logins"
	chmod 0755 "$BASEDIR/usr/bin/bdiff"
	chown root:bin "$BASEDIR/usr/bin/bdiff"
	chmod 0755 "$BASEDIR/usr/lib/amd64/madv.so.1"
	chown root:bin "$BASEDIR/usr/lib/amd64/madv.so.1"
	chmod 0755 "$BASEDIR/usr/lib/amd64/mpss.so.1"
	chown root:bin "$BASEDIR/usr/lib/amd64/mpss.so.1"
	chmod 0755 "$BASEDIR/usr/lib/madv.so.1"
	chown root:bin "$BASEDIR/usr/lib/madv.so.1"
	chmod 0755 "$BASEDIR/usr/lib/mpss.so.1"
	chown root:bin "$BASEDIR/usr/lib/mpss.so.1"
	chmod 0755 "$BASEDIR/usr/lib/pci/pcidr_plugin.so"
	chown root:bin "$BASEDIR/usr/lib/pci/pcidr_plugin.so"
	chmod 0755 "$BASEDIR/usr/lib/sysevent/modules/datalink_mod.so"
	chown root:bin "$BASEDIR/usr/lib/sysevent/modules/datalink_mod.so"
	chmod 0755 "$BASEDIR/usr/lib/sysevent/modules/sysevent_conf_mod.so"
	chown root:bin "$BASEDIR/usr/lib/sysevent/modules/sysevent_conf_mod.so"
	chmod 0755 "$BASEDIR/usr/lib/sysevent/modules/sysevent_reg_mod.so"
	chown root:bin "$BASEDIR/usr/lib/sysevent/modules/sysevent_reg_mod.so"
	chmod 4511 "$BASEDIR/usr/bin/tip-illumos"
	chown uucp:bin "$BASEDIR/usr/bin/tip-illumos"
	chmod 4555 "$BASEDIR/usr/bin/fdformat"
	chown root:bin "$BASEDIR/usr/bin/fdformat"
	chmod 4555 "$BASEDIR/usr/bin/newtask"
	chown root:bin "$BASEDIR/usr/bin/newtask"
	chmod 4555 "$BASEDIR/usr/bin/w"
	chown root:bin "$BASEDIR/usr/bin/w"
	chmod 4555 "$BASEDIR/usr/lib/fs/ufs/quota"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/quota"
	chmod 4555 "$BASEDIR/usr/lib/fs/ufs/ufsdump"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/ufsdump"
	chmod 4555 "$BASEDIR/usr/lib/fs/ufs/ufsrestore"
	chown root:bin "$BASEDIR/usr/lib/fs/ufs/ufsrestore"
	chmod 4555 "$BASEDIR/usr/lib/utmp_update"
	chown root:bin "$BASEDIR/usr/lib/utmp_update"
	chmod 4555 "$BASEDIR/usr/sbin/allocate"
	chown root:bin "$BASEDIR/usr/sbin/allocate"
	chmod 4555 "$BASEDIR/usr/sbin/whodo"
	chown root:bin "$BASEDIR/usr/sbin/whodo"
	chmod 4755 "$BASEDIR/usr/bin/newgrp"
	chown root:bin "$BASEDIR/usr/bin/newgrp"
	[ -f $BASEDIR/etc/device.tab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/device.tab $BASEDIR/etc/device.tab
	chmod 0444 "$BASEDIR/etc/device.tab"
	chown root:root "$BASEDIR/etc/device.tab"
	[ -f $BASEDIR/etc/dfs/sharetab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/sharetab $BASEDIR/etc/dfs/sharetab
	chmod 0444 "$BASEDIR/etc/dfs/sharetab"
	chown root:root "$BASEDIR/etc/dfs/sharetab"
	[ -f $BASEDIR/etc/mnttab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/mnttab $BASEDIR/etc/mnttab
	chmod 0444 "$BASEDIR/etc/mnttab"
	chown root:root "$BASEDIR/etc/mnttab"
	chmod 0555 "$BASEDIR/usr/bin/strchg"
	chown root:root "$BASEDIR/usr/bin/strchg"
	chmod 0555 "$BASEDIR/usr/bin/strconf"
	chown root:root "$BASEDIR/usr/bin/strconf"
	[ -f $BASEDIR/etc/dfs/fstypes ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/fstypes $BASEDIR/etc/dfs/fstypes
	chmod 0644 "$BASEDIR/etc/dfs/fstypes"
	chown root:root "$BASEDIR/etc/dfs/fstypes"
	chmod 0444 "$BASEDIR/etc/datemsk"
	chown root:sys "$BASEDIR/etc/datemsk"
	[ -f $BASEDIR/etc/dgroup.tab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/dgroup.tab $BASEDIR/etc/dgroup.tab
	chmod 0444 "$BASEDIR/etc/dgroup.tab"
	chown root:sys "$BASEDIR/etc/dgroup.tab"
	chmod 0444 "$BASEDIR/etc/sysevent/config/README"
	chown root:sys "$BASEDIR/etc/sysevent/config/README"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/boot-archive-update.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/boot-archive-update.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/boot-archive.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/boot-archive.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/boot-config.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/boot-config.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/hostid.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/hostid.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/idmap.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/idmap.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/name-service-cache.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/name-service-cache.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/pfexecd.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/pfexecd.xml"
	chmod 0444 "$BASEDIR/lib/svc/manifest/system/utmp.xml"
	chown root:sys "$BASEDIR/lib/svc/manifest/system/utmp.xml"
	chmod 0444 "$BASEDIR/usr/sadm/install/miniroot.db"
	chown root:sys "$BASEDIR/usr/sadm/install/miniroot.db"
	chmod 0500 "$BASEDIR/etc/flash/precreation/caplib"
	chown root:sys "$BASEDIR/etc/flash/precreation/caplib"
	chmod 0555 "$BASEDIR/etc/security/lib/audio_clean"
	chown root:sys "$BASEDIR/etc/security/lib/audio_clean"
	chmod 0555 "$BASEDIR/etc/security/lib/fd_clean"
	chown root:sys "$BASEDIR/etc/security/lib/fd_clean"
	chmod 0555 "$BASEDIR/etc/security/lib/sr_clean"
	chown root:sys "$BASEDIR/etc/security/lib/sr_clean"
	chmod 0555 "$BASEDIR/etc/security/lib/st_clean"
	chown root:sys "$BASEDIR/etc/security/lib/st_clean"
	chmod 0555 "$BASEDIR/sbin/mountall"
	chown root:sys "$BASEDIR/sbin/mountall"
	chmod 0555 "$BASEDIR/sbin/uadmin"
	chown root:sys "$BASEDIR/sbin/uadmin"
	chmod 0555 "$BASEDIR/sbin/umountall"
	chown root:sys "$BASEDIR/sbin/umountall"
	chmod 0555 "$BASEDIR/usr/bin/setpgrp"
	chown root:sys "$BASEDIR/usr/bin/setpgrp"
	chmod 0555 "$BASEDIR/usr/lib/passmgmt"
	chown root:sys "$BASEDIR/usr/lib/passmgmt"
	chmod 0555 "$BASEDIR/usr/lib/reparse/reparsed"
	chown root:sys "$BASEDIR/usr/lib/reparse/reparsed"
	chmod 0555 "$BASEDIR/usr/lib/saf/sac"
	chown root:sys "$BASEDIR/usr/lib/saf/sac"
	chmod 0555 "$BASEDIR/usr/lib/saf/ttymon"
	chown root:sys "$BASEDIR/usr/lib/saf/ttymon"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.ipsecalgs"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.ipsecalgs"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.kcfconf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.kcfconf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.kmfconf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.kmfconf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.manifest"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.manifest"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.pkcs11conf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.pkcs11conf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/i.rbac"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/i.rbac"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.ipsecalgs"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.ipsecalgs"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.kcfconf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.kcfconf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.kmfconf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.kmfconf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.manifest"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.manifest"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.pkcs11conf"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.pkcs11conf"
	chmod 0555 "$BASEDIR/usr/sadm/install/scripts/r.rbac"
	chown root:sys "$BASEDIR/usr/sadm/install/scripts/r.rbac"
	chmod 0555 "$BASEDIR/usr/sbin/consadm"
	chown root:sys "$BASEDIR/usr/sbin/consadm"
	chmod 0555 "$BASEDIR/usr/sbin/fmthard"
	chown root:sys "$BASEDIR/usr/sbin/fmthard"
	chmod 0555 "$BASEDIR/usr/sbin/fstyp"
	chown root:sys "$BASEDIR/usr/sbin/fstyp"
	chmod 0555 "$BASEDIR/usr/sbin/getdevpolicy"
	chown root:sys "$BASEDIR/usr/sbin/getdevpolicy"
	chmod 0555 "$BASEDIR/usr/sbin/mountall"
	chown root:sys "$BASEDIR/usr/sbin/mountall"
	chmod 0555 "$BASEDIR/usr/sbin/pbind"
	chown root:sys "$BASEDIR/usr/sbin/pbind"
	chmod 0555 "$BASEDIR/usr/sbin/pmadm"
	chown root:sys "$BASEDIR/usr/sbin/pmadm"
	chmod 0555 "$BASEDIR/usr/sbin/projadd"
	chown root:sys "$BASEDIR/usr/sbin/projadd"
	chmod 0555 "$BASEDIR/usr/sbin/projdel"
	chown root:sys "$BASEDIR/usr/sbin/projdel"
	chmod 0555 "$BASEDIR/usr/sbin/projmod"
	chown root:sys "$BASEDIR/usr/sbin/projmod"
	chmod 0555 "$BASEDIR/usr/sbin/prtvtoc"
	chown root:sys "$BASEDIR/usr/sbin/prtvtoc"
	chmod 0555 "$BASEDIR/usr/sbin/psradm"
	chown root:sys "$BASEDIR/usr/sbin/psradm"
	chmod 0555 "$BASEDIR/usr/sbin/psrinfo"
	chown root:sys "$BASEDIR/usr/sbin/psrinfo"
	chmod 0555 "$BASEDIR/usr/sbin/psrset"
	chown root:sys "$BASEDIR/usr/sbin/psrset"
	chmod 0555 "$BASEDIR/usr/sbin/root_archive"
	chown root:sys "$BASEDIR/usr/sbin/root_archive"
	chmod 0555 "$BASEDIR/usr/sbin/strace"
	chown root:sys "$BASEDIR/usr/sbin/strace"
	chmod 0555 "$BASEDIR/usr/sbin/strclean"
	chown root:sys "$BASEDIR/usr/sbin/strclean"
	chmod 0555 "$BASEDIR/usr/sbin/strerr"
	chown root:sys "$BASEDIR/usr/sbin/strerr"
	chmod 0555 "$BASEDIR/usr/sbin/syseventadm"
	chown root:sys "$BASEDIR/usr/sbin/syseventadm"
	chmod 0555 "$BASEDIR/usr/sbin/umountall"
	chown root:sys "$BASEDIR/usr/sbin/umountall"
	[ -f $BASEDIR/etc/.login ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/.login $BASEDIR/etc/.login
	chmod 0644 "$BASEDIR/etc/.login"
	chown root:sys "$BASEDIR/etc/.login"
	[ -f $BASEDIR/etc/crypto/kmf.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/kmf.conf $BASEDIR/etc/crypto/kmf.conf
	chmod 0644 "$BASEDIR/etc/crypto/kmf.conf"
	chown root:sys "$BASEDIR/etc/crypto/kmf.conf"
	[ -f $BASEDIR/etc/crypto/pkcs11.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/pkcs11.conf $BASEDIR/etc/crypto/pkcs11.conf
	chmod 0644 "$BASEDIR/etc/crypto/pkcs11.conf"
	chown root:sys "$BASEDIR/etc/crypto/pkcs11.conf"
	[ -f $BASEDIR/etc/default/fs ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/fs $BASEDIR/etc/default/fs
	chmod 0644 "$BASEDIR/etc/default/fs"
	chown root:sys "$BASEDIR/etc/default/fs"
	[ -f $BASEDIR/etc/default/nss ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/nss $BASEDIR/etc/default/nss
	chmod 0644 "$BASEDIR/etc/default/nss"
	chown root:sys "$BASEDIR/etc/default/nss"
	[ -f $BASEDIR/etc/default/utmpd ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/utmpd $BASEDIR/etc/default/utmpd
	chmod 0644 "$BASEDIR/etc/default/utmpd"
	chown root:sys "$BASEDIR/etc/default/utmpd"
	[ -f $BASEDIR/etc/dev/reserved_devnames ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/reserved_devnames $BASEDIR/etc/dev/reserved_devnames
	chmod 0644 "$BASEDIR/etc/dev/reserved_devnames"
	chown root:sys "$BASEDIR/etc/dev/reserved_devnames"
	[ -f $BASEDIR/etc/dfs/dfstab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/dfstab $BASEDIR/etc/dfs/dfstab
	chmod 0644 "$BASEDIR/etc/dfs/dfstab"
	chown root:sys "$BASEDIR/etc/dfs/dfstab"
	[ -f $BASEDIR/etc/dhcp/inittab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/inittab $BASEDIR/etc/dhcp/inittab
	chmod 0644 "$BASEDIR/etc/dhcp/inittab"
	chown root:sys "$BASEDIR/etc/dhcp/inittab"
	[ -f $BASEDIR/etc/dhcp/inittab6 ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/inittab6 $BASEDIR/etc/dhcp/inittab6
	chmod 0644 "$BASEDIR/etc/dhcp/inittab6"
	chown root:sys "$BASEDIR/etc/dhcp/inittab6"
	[ -f $BASEDIR/etc/format.dat ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/format.dat $BASEDIR/etc/format.dat
	chmod 0644 "$BASEDIR/etc/format.dat"
	chown root:sys "$BASEDIR/etc/format.dat"
	[ -f $BASEDIR/etc/inet/inetd.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/inetd.conf $BASEDIR/etc/inet/inetd.conf
	chmod 0644 "$BASEDIR/etc/inet/inetd.conf"
	chown root:sys "$BASEDIR/etc/inet/inetd.conf"
	[ -f $BASEDIR/etc/ioctl.syscon ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/ioctl.syscon $BASEDIR/etc/ioctl.syscon
	chmod 0644 "$BASEDIR/etc/ioctl.syscon"
	chown root:sys "$BASEDIR/etc/ioctl.syscon"
	[ -f $BASEDIR/etc/logadm.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/logadm.conf $BASEDIR/etc/logadm.conf
	chmod 0644 "$BASEDIR/etc/logadm.conf"
	chown root:sys "$BASEDIR/etc/logadm.conf"
	chmod 0644 "$BASEDIR/etc/net/ticlts/hosts"
	chown root:sys "$BASEDIR/etc/net/ticlts/hosts"
	[ -f $BASEDIR/etc/net/ticlts/services ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/services $BASEDIR/etc/net/ticlts/services
	chmod 0644 "$BASEDIR/etc/net/ticlts/services"
	chown root:sys "$BASEDIR/etc/net/ticlts/services"
	chmod 0644 "$BASEDIR/etc/net/ticots/hosts"
	chown root:sys "$BASEDIR/etc/net/ticots/hosts"
	[ -f $BASEDIR/etc/net/ticots/services ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/services $BASEDIR/etc/net/ticots/services
	chmod 0644 "$BASEDIR/etc/net/ticots/services"
	chown root:sys "$BASEDIR/etc/net/ticots/services"
	chmod 0644 "$BASEDIR/etc/net/ticotsord/hosts"
	chown root:sys "$BASEDIR/etc/net/ticotsord/hosts"
	[ -f $BASEDIR/etc/net/ticotsord/services ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/services $BASEDIR/etc/net/ticotsord/services
	chmod 0644 "$BASEDIR/etc/net/ticotsord/services"
	chown root:sys "$BASEDIR/etc/net/ticotsord/services"
	[ -f $BASEDIR/etc/netconfig ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/netconfig $BASEDIR/etc/netconfig
	chmod 0644 "$BASEDIR/etc/netconfig"
	chown root:sys "$BASEDIR/etc/netconfig"
	[ -f $BASEDIR/etc/nscd.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/nscd.conf $BASEDIR/etc/nscd.conf
	chmod 0644 "$BASEDIR/etc/nscd.conf"
	chown root:sys "$BASEDIR/etc/nscd.conf"
	chmod 0644 "$BASEDIR/etc/nsswitch.ad"
	chown root:sys "$BASEDIR/etc/nsswitch.ad"
	[ -f $BASEDIR/etc/nsswitch.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/nsswitch.dns $BASEDIR/etc/nsswitch.conf
	chmod 0644 "$BASEDIR/etc/nsswitch.conf"
	chown root:sys "$BASEDIR/etc/nsswitch.conf"
	chmod 0644 "$BASEDIR/etc/nsswitch.dns"
	chown root:sys "$BASEDIR/etc/nsswitch.dns"
	chmod 0644 "$BASEDIR/etc/nsswitch.files"
	chown root:sys "$BASEDIR/etc/nsswitch.files"
	chmod 0644 "$BASEDIR/etc/nsswitch.ldap"
	chown root:sys "$BASEDIR/etc/nsswitch.ldap"
	[ -f $BASEDIR/etc/project ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/project $BASEDIR/etc/project
	chmod 0644 "$BASEDIR/etc/project"
	chown root:sys "$BASEDIR/etc/project"
	chmod 0644 "$BASEDIR/etc/release_diff"
	chown root:sys "$BASEDIR/etc/release_diff"
	chmod 0644 "$BASEDIR/etc/release_revision"
	chown root:sys "$BASEDIR/etc/release_revision"
	[ -f $BASEDIR/etc/saf/_sactab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/_sactab $BASEDIR/etc/saf/_sactab
	chmod 0644 "$BASEDIR/etc/saf/_sactab"
	chown root:sys "$BASEDIR/etc/saf/_sactab"
	[ -f $BASEDIR/etc/saf/_sysconfig ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/_sysconfig $BASEDIR/etc/saf/_sysconfig
	chmod 0644 "$BASEDIR/etc/saf/_sysconfig"
	chown root:sys "$BASEDIR/etc/saf/_sysconfig"
	[ -f $BASEDIR/etc/saf/zsmon/_pmtab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/_pmtab $BASEDIR/etc/saf/zsmon/_pmtab
	chmod 0644 "$BASEDIR/etc/saf/zsmon/_pmtab"
	chown root:sys "$BASEDIR/etc/saf/zsmon/_pmtab"
	[ -f $BASEDIR/etc/security/audit_class ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/audit_class $BASEDIR/etc/security/audit_class
	chmod 0644 "$BASEDIR/etc/security/audit_class"
	chown root:sys "$BASEDIR/etc/security/audit_class"
	[ -f $BASEDIR/etc/security/audit_event ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/audit_event $BASEDIR/etc/security/audit_event
	chmod 0644 "$BASEDIR/etc/security/audit_event"
	chown root:sys "$BASEDIR/etc/security/audit_event"
	[ -f $BASEDIR/etc/security/auth_attr ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/auth_attr $BASEDIR/etc/security/auth_attr
	chmod 0644 "$BASEDIR/etc/security/auth_attr"
	chown root:sys "$BASEDIR/etc/security/auth_attr"
	chmod 0644 "$BASEDIR/etc/security/auth_attr.d/SUNWcs"
	chown root:sys "$BASEDIR/etc/security/auth_attr.d/SUNWcs"
	[ -f $BASEDIR/etc/security/crypt.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/crypt.conf $BASEDIR/etc/security/crypt.conf
	chmod 0644 "$BASEDIR/etc/security/crypt.conf"
	chown root:sys "$BASEDIR/etc/security/crypt.conf"
	[ -f $BASEDIR/etc/security/exec_attr ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/exec_attr $BASEDIR/etc/security/exec_attr
	chmod 0644 "$BASEDIR/etc/security/exec_attr"
	chown root:sys "$BASEDIR/etc/security/exec_attr"
	chmod 0644 "$BASEDIR/etc/security/exec_attr.d/SUNWcs"
	chown root:sys "$BASEDIR/etc/security/exec_attr.d/SUNWcs"
	[ -f $BASEDIR/etc/security/policy.conf ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/policy.conf $BASEDIR/etc/security/policy.conf
	chmod 0644 "$BASEDIR/etc/security/policy.conf"
	chown root:sys "$BASEDIR/etc/security/policy.conf"
	[ -f $BASEDIR/etc/security/priv_names ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/priv_names $BASEDIR/etc/security/priv_names
	chmod 0644 "$BASEDIR/etc/security/priv_names"
	chown root:sys "$BASEDIR/etc/security/priv_names"
	[ -f $BASEDIR/etc/security/prof_attr ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/prof_attr $BASEDIR/etc/security/prof_attr
	chmod 0644 "$BASEDIR/etc/security/prof_attr"
	chown root:sys "$BASEDIR/etc/security/prof_attr"
	chmod 0644 "$BASEDIR/etc/security/prof_attr.d/SUNWcs"
	chown root:sys "$BASEDIR/etc/security/prof_attr.d/SUNWcs"
	chmod 0644 "$BASEDIR/etc/sysevent/config/SUNW,EC_dr,ESC_dr_req,sysevent.conf"
	chown root:sys "$BASEDIR/etc/sysevent/config/SUNW,EC_dr,ESC_dr_req,sysevent.conf"
	[ -f $BASEDIR/etc/ttydefs ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/ttydefs $BASEDIR/etc/ttydefs
	chmod 0644 "$BASEDIR/etc/ttydefs"
	chown root:sys "$BASEDIR/etc/ttydefs"
	[ -f $BASEDIR/etc/ttysrch ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/ttysrch $BASEDIR/etc/ttysrch
	chmod 0644 "$BASEDIR/etc/ttysrch"
	chown root:sys "$BASEDIR/etc/ttysrch"
	[ -f $BASEDIR/etc/user_attr ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/user_attr $BASEDIR/etc/user_attr
	chmod 0644 "$BASEDIR/etc/user_attr"
	chown root:sys "$BASEDIR/etc/user_attr"
	chmod 0644 "$BASEDIR/etc/user_attr.d/SUNWcs"
	chown root:sys "$BASEDIR/etc/user_attr.d/SUNWcs"
	[ -f $BASEDIR/etc/vfstab ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/vfstab $BASEDIR/etc/vfstab
	chmod 0644 "$BASEDIR/etc/vfstab"
	chown root:sys "$BASEDIR/etc/vfstab"
	chmod 0644 "$BASEDIR/usr/lib/adb/adbsub.o"
	chown root:sys "$BASEDIR/usr/lib/adb/adbsub.o"
	chmod 0644 "$BASEDIR/usr/lib/adb/amd64/adbsub.o"
	chown root:sys "$BASEDIR/usr/lib/adb/amd64/adbsub.o"
	[ -f $BASEDIR/var/saf/zsmon/log ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/log $BASEDIR/var/saf/zsmon/log
	chmod 0644 "$BASEDIR/var/saf/zsmon/log"
	chown root:sys "$BASEDIR/var/saf/zsmon/log"
	[ -f $BASEDIR/etc/dumpdates ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/dumpdates $BASEDIR/etc/dumpdates
	chmod 0664 "$BASEDIR/etc/dumpdates"
	chown root:sys "$BASEDIR/etc/dumpdates"
	[ -f $BASEDIR/etc/security/audit_warn ] || cp -ax $BASEDIR/usr/share/doc/util-illumos/examples/audit_warn $BASEDIR/etc/security/audit_warn
	chmod 0740 "$BASEDIR/etc/security/audit_warn"
	chown root:sys "$BASEDIR/etc/security/audit_warn"
	chmod 0744 "$BASEDIR/sbin/swapadd"
	chown root:sys "$BASEDIR/sbin/swapadd"
	chmod 0755 "$BASEDIR/usr/lib/adb/adbgen"
	chown root:sys "$BASEDIR/usr/lib/adb/adbgen"
	chmod 0755 "$BASEDIR/usr/lib/adb/adbgen1"
	chown root:sys "$BASEDIR/usr/lib/adb/adbgen1"
	chmod 0755 "$BASEDIR/usr/lib/adb/adbgen3"
	chown root:sys "$BASEDIR/usr/lib/adb/adbgen3"
	chmod 0755 "$BASEDIR/usr/lib/adb/adbgen4"
	chown root:sys "$BASEDIR/usr/lib/adb/adbgen4"
	chmod 0755 "$BASEDIR/usr/lib/saf/listen"
	chown root:sys "$BASEDIR/usr/lib/saf/listen"
	chmod 0755 "$BASEDIR/usr/lib/saf/nlps_server"
	chown root:sys "$BASEDIR/usr/lib/saf/nlps_server"
	chmod 0755 "$BASEDIR/usr/sbin/sttydefs"
	chown root:sys "$BASEDIR/usr/sbin/sttydefs"
	chmod 0755 "$BASEDIR/usr/sbin/ttyadm"
	chown root:sys "$BASEDIR/usr/sbin/ttyadm"
	chmod 2555 "$BASEDIR/usr/sbin/eeprom"
	chown root:sys "$BASEDIR/usr/sbin/eeprom"
	chmod 2555 "$BASEDIR/usr/sbin/swap"
	chown root:sys "$BASEDIR/usr/sbin/swap"
	chmod 2555 "$BASEDIR/usr/sbin/sysdef"
	chown root:sys "$BASEDIR/usr/sbin/sysdef"
	chmod 4755 "$BASEDIR/usr/sbin/sacadm"
	chown root:sys "$BASEDIR/usr/sbin/sacadm"
	chmod 2555 "$BASEDIR/system/bin/wall"
	chown root:tty "$BASEDIR/system/bin/wall"
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument '$1'" >&2
        exit 1
    ;;
esac



# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

